const {defineConfig} = require('@vue/cli-service')

module.exports = defineConfig({
    transpileDependencies: true,
    devServer: {
        port: 30,
        proxy: {
            '/category': {
                target: 'http://127.0.0.1:8080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    "/category": ""
                }
            },
            '/book': {
                target: 'http://127.0.0.1:8080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    "/book": ""
                }
            },
            '/common': {
                target: 'http://127.0.0.1:8080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    "/common": ""
                }
            },
             '/employee': {
                target: 'http://127.0.0.1:8080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    "/employee": ""
                }
            },
            '/user': {
                target: 'http://127.0.0.1:8080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    "/user": ""
                }
            },
            '/borrow': {
                target: 'http://127.0.0.1:8080',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    "/borrow": ""
                }
            },

        }
    },

    //打包配置
    assetsDir: 'static',
    parallel: false,
    publicPath: './',
})

